package com.example.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class MyWebMvcConfig implements WebMvcConfigurer {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/").setViewName("main-page");
        registry.addViewController("/login/page.html").setViewName("login-register-page");
        registry.addViewController("/forget/password/page.html").setViewName("forget-password");
        registry.addViewController("/student/list.html").setViewName("student/student-list");
        registry.addViewController("/teacher/list.html").setViewName("teacher/teacher-list");
        registry.addViewController("/department/list.html").setViewName("department/department-list");
        registry.addViewController("/lecture/list.html").setViewName("lecture/lecture-list");
        registry.addViewController("/user/list.html").setViewName("user/user-list");
        registry.addViewController("/course/list.html").setViewName("course/course-list");
        registry.addViewController("/user/bind/page.html").setViewName("user/user-bind");
    }
}
